package com.hziee.mail.model;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author ZX
 */
@Entity
@Table(name = "product_class_info", schema = "mall", catalog = "")
public class ProductClassInfoEntity {
    private String productClassId;
    private String productClassName;
    private int brandId;

    @Id
    @Column(name = "product_class_id")
    public String getProductClassId() {
        return productClassId;
    }

    public void setProductClassId(String productClassId) {
        this.productClassId = productClassId;
    }

    @Basic
    @Column(name = "product_class_name")
    public String getProductClassName() {
        return productClassName;
    }

    public void setProductClassName(String productClassName) {
        this.productClassName = productClassName;
    }

    @Basic
    @Column(name = "brand_id")
    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProductClassInfoEntity that = (ProductClassInfoEntity) o;
        return brandId == that.brandId &&
                Objects.equals(productClassId, that.productClassId) &&
                Objects.equals(productClassName, that.productClassName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(productClassId, productClassName, brandId);
    }
}
